/**
 * 
 */
package cn.jhz.filesharingsystem.service;

import java.io.IOException;

import org.apache.lucene.queryparser.classic.ParseException;
import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.highlight.InvalidTokenOffsetsException;

import cn.jhz.filesharingsystem.model.FileArticle;
import cn.jhz.filesharingsystem.model.Pager;

/**
 * @author asus
 *
 */
public interface SearchServer {
	
	public Pager<FileArticle> getSearchPage(Query query, IndexSearcher indexSearcher) throws IOException, InvalidTokenOffsetsException;
	
	public Query getQuery(String keywords) throws ParseException;

	public IndexSearcher getIndexSearcher() throws IOException;
}
